﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ChallengePuzzle.Lib
{
    public class LuckyThread
    {
        LuckyNumbers luckyNumbers = new LuckyNumbers();

        Judger judger = new Judger();

        public LuckyNumbers SearchLuckyNumbers(int X, int Y)
        {

            for (int i = X; i <= Y; i++)
            {
                PickLuckyNumber(i);
            }

            return luckyNumbers;
        }

        private void PickLuckyNumber(int i)
        {
            if (judger.IsLuckyNumber(i)) luckyNumbers.Add(i);
        }
    }
}
